package com.inf.vo;

/**
 * Created by zhangbn on 2018/11/9.
 */
public class ResultPartnerVo {

    String uuid;
    Integer times;
    String pass_time;
    String pass_id;
    String camera_id;
    String face_img_url;

    public ResultPartnerVo() {
    }

    public ResultPartnerVo(String uuid, Integer times, String pass_time, String pass_id, String camera_id, String face_img_url) {
        this.uuid = uuid;
        this.times = times;
        this.pass_time = pass_time;
        this.pass_id = pass_id;
        this.camera_id = camera_id;
        this.face_img_url = face_img_url;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Integer getTimes() {
        return times;
    }

    public void setTimes(Integer times) {
        this.times = times;
    }

    public String getPass_time() {
        return pass_time;
    }

    public void setPass_time(String pass_time) {
        this.pass_time = pass_time;
    }

    public String getPass_id() {
        return pass_id;
    }

    public void setPass_id(String pass_id) {
        this.pass_id = pass_id;
    }

    public String getCamera_id() {
        return camera_id;
    }

    public void setCamera_id(String camera_id) {
        this.camera_id = camera_id;
    }

    public String getFace_img_url() {
        return face_img_url;
    }

    public void setFace_img_url(String face_img_url) {
        this.face_img_url = face_img_url;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        ResultPartnerVo p = (ResultPartnerVo) obj;
        if (uuid.length() == 44) {
            if (p.getUuid().length() == 44) {
                if (uuid.substring(12).equals(p.getUuid().substring(12))) {
                    return true;
                }
            } else if (p.getUuid().length() == 32) {
                if (uuid.substring(12).equals(p.getUuid())) {
                    return true;
                }
            } else {
                return false;
            }
        }
        if (uuid.length() == 32) {
            if (p.getUuid().length() == 32) {
                if (uuid.equals(p.getUuid())) {
                    return true;
                }
            } else if (p.getUuid().length() == 44) {
                if (uuid.equals(p.getUuid().substring(12))) {
                    return true;
                }
            } else {
                return false;
            }
        }
        if (uuid.equals(p.getUuid())) {
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        if (uuid.length() == 44) {
            return uuid.substring(12).hashCode();
        }
        return uuid.hashCode();
    }

}
